import request from '@/utils/request'

// 获取招商项目信息列表
export function investInfoQuery(params) {
  return request({
    method: 'get',
    url: '/pad/business/project/query',
    params
  })
}

// 获取项目经理列表
export function businessProjectManager() {
  return request({
    method: 'get',
    url: '/pad/param/manage/business/project/manager'
  })
}

// 新增招商项目信息
export function addInvestInfo(data) {
  return request({
    method: 'post',
    url: '/pad/business/project/addOrUpdate',
    data: data
  })
}

// 删除招商项目信息
export function deleteInvestInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/business/project/delete?pkid=${pkid}`
  })
}

// 下载招商项目信息
export function downloadInvestInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/business/project',
    params
  })
}

// 下载招商项目信息
export function downloadInvestInfoXlsx(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/pdf/home/exportXlsx',
    params
  })
}

// 查询链主选项
export function queryChainMasterOptions(params) {
  return request({
    method: 'get',
    url: '/pad/business/project/getInfoByLinkSource',
    params
  })
}

// 查询拟入驻载体选项

export function querySettledCarrier(params) {
  return request({
    method: 'get',
    url: '/pad/park/query/getBuildAndPark',
    params
  })
}

// 查询招商项目信息
export function queryInvestInfoById(pkid) {
  return request({
    method: 'get',
    url: `/pad/business/project/get?pkid=${pkid}`
  })
}

// 新增招商项目进度信息
export function addInvestProgressInfo(data) {
  return request({
    method: 'post',
    url: '/pad/business/project/process/addOrUpdate',
    data: data
  })
}

// 编辑建设项目信息
export function editConstructionInfo(data) {
  return request({
    method: 'post',
    url: '/pad/project/addOrUpdate',
    data: data
  })
}

// 删除建设项目信息
export function deleteConstructionInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/project/delete?pkid=${pkid}`
  })
}

// 获取在建项目信息列表
export function queryConstructionProject(params) {
  return request({
    method: 'get',
    url: '/pad/project/manage/depart/query',
    params
  })
}

// 查询在建项目基础信息详情
export function queryConstructionBaseInfo(pkid) {
  return request({
    method: 'get',
    url: `/pad/project/manage/get?pkid=${pkid}`
  })
}

// 下载在建项目信息
export function downloadConstructionBaseInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/build/project',
    params
  })
}

// 获取项目标段列表
export function queryProjectSection(params) {
  return request({
    method: 'get',
    url: '/pad/project/section/query',
    params
  })
}

// 保存项目标段信息
export function addSectionInfo(data) {
  return request({
    method: 'post',
    url: '/pad/section/addOrUpdate',
    data: data
  })
}

// 查询项目标段详情
export function querySectionInfo(pkid) {
  return request({
    method: 'get',
    url: `/pad/section/get?pkid=${pkid}`
  })
}

// 删除项目标段信息
export function deleteSectionInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/section/delete?pkid=${pkid}`
  })
}

// 下载标段信息
export function downloadSectionInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/project/section',
    params
  })
}

// 通过项目类型Ⅱ获取节点
export function queryNodeByType(type) {
  return request({
    method: 'get',
    url: `/pad/section/node/query?type=${type}`
  })
}

// 保存项目标段进展信息
export function addSectionProgressInfo(data) {
  return request({
    method: 'post',
    url: '/pad/section/stage/addOrUpdate',
    data: data
  })
}

// 获取固投目标列表
export function queryFixedInvestmentTarget(params) {
  return request({
    method: 'get',
    url: '/pad/project/process/query',
    params
  })
}

// 根据月份查询固投列表
export function queryFixedInfoByMonth(params) {
  return request({
    method: 'get',
    url: '/pad/process/fixed/query',
    params
  })
}

// 保存固投信息
export function addFixedInfo(data) {
  return request({
    method: 'post',
    url: '/pad/process/fixed/update',
    data: data
  })
}

// 下载固投信息
export function downloadFixedInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/project/process',
    params
  })
}

// 获取土地报征信息列表
export function landExpropriationQuery(params) {
  return request({
    method: 'get',
    url: '/pad/land/sign/query',
    params
  })
}

// 新增土地报征信息
export function addLandExpropriation(data) {
  return request({
    method: 'post',
    url: '/pad/land/sign/addOrUpdate',
    data: data
  })
}

// 删除土地报征信息
export function deleteLandExpropriation(pkid) {
  return request({
    method: 'delete',
    url: `/pad/land/sign/delete?pkid=${pkid}`
  })
}

// 下载土地报征
export function downloadLandExpropriation(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/land/sign',
    params
  })
}

// 获取土地供应信息列表
export function landSupplyQuery(params) {
  return request({
    method: 'get',
    url: '/pad/land/support/query',
    params
  })
}

// 新增土地供应信息
export function addLandSupply(data) {
  return request({
    method: 'post',
    url: '/pad/land/support/addOrUpdate',
    data: data
  })
}

// 删除土地供应信息
export function deleteLandSupply(pkid) {
  return request({
    method: 'delete',
    url: `/pad/land/support/delete?pkid=${pkid}`
  })
}

// 下载土地供应
export function downloadLandSupply(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/land/support',
    params
  })
}

// 获取土地拆迁信息列表
export function landDemolitionQuery(params) {
  return request({
    method: 'get',
    url: '/pad/land/remove/query',
    params
  })
}

// 新增土地拆迁信息
export function addLandDemolition(data) {
  return request({
    method: 'post',
    url: '/pad/land/remove/addOrUpdate',
    data: data
  })
}

// 删除土地拆迁信息
export function deleteLandDemolition(pkid) {
  return request({
    method: 'delete',
    url: `/pad/land/remove/delete?pkid=${pkid}`
  })
}

// 下载土地拆迁
export function downloadLandDemolition(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/land/remove',
    params
  })
}

// 获取科研机构信息列表
export function scientificInstitutionsQuery(params) {
  return request({
    method: 'get',
    url: '/pad/technology/organization/query',
    params
  })
}

// 新增科研机构信息
export function addScientificInstitutions(data) {
  return request({
    method: 'post',
    url: '/pad/technology/organization/addOrUpdate',
    data: data
  })
}

// 删除科研机构信息
export function deleteScientificInstitutions(pkid) {
  return request({
    method: 'delete',
    url: `/pad/technology/organization/delete?pkid=${pkid}`
  })
}

// 下载科研机构
export function downloadScientificInstitutions(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/organization',
    params
  })
}

// 获取孵化企业信息列表
export function incubateEnterprisesQuery(params) {
  return request({
    method: 'get',
    url: '/pad/technology/enterprise/query',
    params
  })
}

// 新增孵化企业信息
export function addIncubateEnterprise(data) {
  return request({
    method: 'post',
    url: '/pad/technology/enterprise/addOrUpdate',
    data: data
  })
}

// 删除孵化企业信息
export function deleteIncubateEnterprise(pkid) {
  return request({
    method: 'delete',
    url: `/pad/technology/enterprise/delete?pkid=${pkid}`
  })
}

// 下载孵化企业
export function downloadIncubateEnterprise(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/enterprise'
  })
}

// 获取中试平台信息列表
export function centerPlatformQuery(params) {
  return request({
    method: 'get',
    url: '/pad/technology/pilot/query',
    params
  })
}

// 新增中试平台信息
export function addCenterPlatform(data) {
  return request({
    method: 'post',
    url: '/pad/technology/pilot/addOrUpdate',
    data: data
  })
}

// 删除中试平台信息
export function deleteCenterPlatform(pkid) {
  return request({
    method: 'delete',
    url: `/pad/technology/pilot/delete?pkid=${pkid}`
  })
}

// 下载中试平台信息
export function downloadCenterPlatform(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/pilot',
    params
  })
}

// 获取民航示范区信息列表
export function civilAviationZoneQuery(params) {
  return request({
    method: 'get',
    url: '/pad/technology/special/query',
    params
  })
}

// 新增民航示范区信息
export function addCivilAviationZone(data) {
  return request({
    method: 'post',
    url: '/pad/technology/special/addOrUpdate',
    data: data
  })
}

// 删除民航示范区信息
export function deleteCivilAviationZone(pkid) {
  return request({
    method: 'delete',
    url: `/pad/technology/special/delete?pkid=${pkid}`
  })
}

// 下载民航示范区信息
export function downloadCivilAviationZone(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/special',
    params
  })
}

// 获取人才聚集信息列表
export function gatherTalentsQuery(params) {
  return request({
    method: 'get',
    url: '/pad/technology/expert/query',
    params
  })
}

// 新增人才聚集信息
export function addGatherTalents(data) {
  return request({
    method: 'post',
    url: '/pad/technology/expert/addOrUpdate',
    data: data
  })
}

// 删除人才聚集信息
export function deleteGatherTalents(pkid) {
  return request({
    method: 'delete',
    url: `/pad/technology/expert/delete?pkid=${pkid}`
  })
}

// 下载人才聚集信息
export function downloadGatherTalents(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/expert',
    params
  })
}

// 获取绛溪实验室信息列表
export function laboratoryManagementQuery(params) {
  return request({
    method: 'get',
    url: '/pad/technology/other/query',
    params
  })
}

// 新增绛溪实验室信息
export function addLaboratoryManagement(data) {
  return request({
    method: 'post',
    url: '/pad/technology/other/addOrUpdate',
    data: data
  })
}

// 删除绛溪实验室信息
export function deleteLaboratoryManagement(pkid) {
  return request({
    method: 'delete',
    url: `/pad/technology/other/delete?pkid=${pkid}`
  })
}

// 下载绛溪实验室
export function downloadLaboratoryManagement(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/organization',
    params
  })
}

// 获取校地合作信息列表
export function universityCollaborationQuery(params) {
  return request({
    method: 'get',
    url: '/pad/technology/school/query',
    params
  })
}

// 新增校地合作信息
export function addUniversityCollaboration(data) {
  return request({
    method: 'post',
    url: '/pad/technology/school/addOrUpdate',
    data: data
  })
}

// 删除校地合作信息
export function deleteUniversityCollaboration(pkid) {
  return request({
    method: 'delete',
    url: `/pad/technology/school/delete?pkid=${pkid}`
  })
}

// 获取校地合作信息详情
export function queryUniversityCollaborationById(pkid) {
  return request({
    method: 'get',
    url: `/pad/technology/school/get?pkid=${pkid}`
  })
}

// 获取企业经济指标列表
export function enterpriseEconomicQuery(params) {
  return request({
    method: 'get',
    url: '/pad/enterprise/manageQuery',
    // url: '/pad/enterprise/query',
    params
  })
}

// 获取企业经济指标最新有数据年月
export function enterpriseEconomicMonthQuery() {
  return request({
    method: 'get',
    url: '/pad/enterprise/newest/time/query'
  })
}

// 新增企业经济指标信息
export function addEnterpriseEconomic(data) {
  return request({
    method: 'post',
    url: '/pad/enterprise/addOrUpdate',
    data: data
  })
}

// 删除企业经济指标信息
export function deleteEnterpriseEconomic(pkid) {
  return request({
    method: 'delete',
    url: `/pad/enterprise/delete?pkid=${pkid}`
  })
}

// 下载企业经济指标信息
export function downloadEnterpriseEconomic(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/invest/enterprise',
    params
  })
}

// 保存企业经济指标列表信息
export function saveEnterpriseEconomicList(data) {
  return request({
    method: 'post',
    url: '/pad/enterprise/addOrUpdateNew',
    data: data
  })
}

// 获取企业信息列表
export function enterpriseInfoQuery(params) {
  return request({
    method: 'get',
    url: '/pad/build/enterprise/query',
    params
  })
}

// 获取企业信息楼宇列表
export function enterpriseInfoBuildQuery(params) {
  return request({
    method: 'get',
    url: '/pad/build/query',
    params
  })
}

// 新增企业信息
export function addEnterpriseInfo(data) {
  return request({
    method: 'post',
    url: '/pad/build/enterprise/addOrUpdate',
    data: data
  })
}

// 删除企业信息
export function deleteEnterpriseInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/build/enterprise/delete?pkid=${pkid}`
  })
}

// 获取外商直接投资额列表
export function foreignInvestmentQuery(params) {
  return request({
    method: 'get',
    url: '/pad/fdi/query/pageList',
    params
  })
}

// 新增外商直接投资额
export function addForeignInvestment(data) {
  return request({
    method: 'post',
    url: '/pad/fdi/addOrUpdate',
    data: data
  })
}

// 删除外商直接投资额
export function deleteForeignInvestment(pkid) {
  return request({
    method: 'delete',
    url: `/pad/fdi/delete?pkid=${pkid}`
  })
}

// 下载外商直接投资额
export function downloadForeignInvestment(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/fdi',
    params
  })
}

// 获取重要目标列表
export function importantGoalQuery(params) {
  return request({
    method: 'get',
    url: '/pad/enterprise/target/query',
    params
  })
}

// 获取重要事件列表
export function importantEventQuery(params) {
  return request({
    method: 'get',
    url: '/pad/other/important/query',
    params
  })
}

// 新增重要事件列表
export function addImportantEvent(data) {
  return request({
    method: 'post',
    url: '/pad/other/important/addOrUpdate',
    data: data
  })
}

// 重要事件详情查询
export function queryImportantEventById(pkid) {
  return request({
    method: 'get',
    url: `/pad/other/important/get?pkid=${pkid}`
  })
}

// 删除重要事件
export function deleteImportantEvent(pkid) {
  return request({
    method: 'delete',
    url: `/pad/other/important/delete?pkid=${pkid}`
  })
}

// 下载重要事件信息
export function downloadImportantEvent(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/important/event',
    params
  })
}

// 获取领导交批办列表
export function queryLeaderApproval(params) {
  return request({
    method: 'get',
    url: '/pad/leader/issue/query',
    params
  })
}

// 领导交批办回复消息
export function leaderReply(data) {
  return request({
    method: 'post',
    url: '/pad/leader/issue/repeat',
    data: data
  })
}

// 领导交批办删除消息
export function leaderDelete(pkid) {
  return request({
    method: 'delete',
    url: `/pad/leader/issue/delete?pkid=${pkid}`
  })
}

// 获取园区管理列表
export function queryParkInfo(params) {
  return request({
    method: 'get',
    url: '/pad/park/query/depart/list',
    params
  })
}

// 新增园区管理信息
export function addParkInfo(data) {
  return request({
    method: 'post',
    url: '/pad/park/addOrUpdate',
    data: data
  })
}

// 重要事件详情查询
export function queryParkInfoById(pkid) {
  return request({
    method: 'get',
    url: `/pad/park/manage/get?pkid=${pkid}`
  })
}

// 删除园区管理信息
export function deleteParkInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/park/delete?pkid=${pkid}`
  })
}

// 下载园区管理信息
export function downloadParkInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/park',
    params
  })
}

// 获取载体列表
export function queryCarrierInfo(params) {
  return request({
    method: 'get',
    url: '/pad/build/query',
    params
  })
}

// 新增载体信息
export function addCarrierInfo(data) {
  return request({
    method: 'post',
    url: '/pad/build/addOrUpdate',
    data: data
  })
}

// 新增载体进度跟踪信息
export function addCarrierProcessInfo(data) {
  return request({
    method: 'post',
    url: '/pad/build/rel/addOrUpdate',
    data: data
  })
}

// 载体信息进度详情查询
export function queryCarrierProcessById(params) {
  return request({
    method: 'get',
    url: '/pad/build/rel/query',
    params
  })
}

// 载体信息详情查询
export function queryCarrierInfoById(pkid) {
  return request({
    method: 'get',
    url: `/pad/build/get?pkid=${pkid}`
  })
}

// 删除载体信息
export function deleteCarrierInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/build/delete?pkid=${pkid}`
  })
}

// 下载载体信息
export function downloadCarrierInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/build/park',
    params
  })
}

// 获取营收利润列表
export function queryRevenueInfo(params) {
  return request({
    method: 'get',
    url: '/pad/profit/depart/query',
    params
  })
}

// 新增营收利润信息
export function addRevenueInfo(data) {
  return request({
    method: 'post',
    url: '/pad/profit/addOrUpdate',
    data: data
  })
}

// 删除营收利润信息
export function deleteRevenueInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/profit/delete?pkid=${pkid}`
  })
}

// 下载营收利润信息
export function downloadRevenueInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/invest/profit',
    params
  })
}

// 产业基金
export function queryIndustryFundInfo(params) {
  return request({
    method: 'get',
    url: '/pad/funds/query/pageList',
    params
  })
}

// 新增产业基金信息
export function addIndustryFundInfo(data) {
  return request({
    method: 'post',
    url: '/pad/funds/addOrUpdate',
    data: data
  })
}

// 删除产业基金信息
export function deleteIndustryFundInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/funds/delete?pkid=${pkid}`
  })
}

// 下载产业基金信息
export function downloadIndustryFundInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/funds',
    params
  })
}

// 获取股权投资列表
export function queryEquityInfo(params) {
  return request({
    method: 'get',
    // url: '/pad/stock/query',
    url: '/pad/stock/manageQuery',
    params
  })
}

// 新增股权投资信息
export function addEquityInfo(data) {
  return request({
    method: 'post',
    url: '/pad/stock/addOrUpdate',
    data: data
  })
}

// 删除股权投资信息
export function deleteEquityInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/stock/delete?pkid=${pkid}`
  })
}

// 下载股权投资信息
export function downloadEquityInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/stock',
    params
  })
}

// 获取商品房列表
export function queryCommercialHouseInfo(params) {
  return request({
    method: 'get',
    url: '/pad/house/query',
    params
  })
}

// 编辑商品房信息
export function addCommercialHouseInfo(data) {
  return request({
    method: 'post',
    url: '/pad/house/addOrUpdate',
    data: data
  })
}

// 删除商品房信息
export function deleteCommercialHouseInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/house/delete?pkid=${pkid}`
  })
}

// 下载商品房信息
export function downloadCommercialHouseInfo(params) {
  return request({
    method: 'get',
    responseType: 'blob',
    url: '/pad/excel/shop/park',
    params
  })
}

// 商品房进度详情查询
export function queryCommercialHouseProcessById(params) {
  return request({
    method: 'get',
    url: '/pad/house/rel/query',
    params
  })
}

// 保存商品房进度信息
export function addCommercialHouseProcess(data) {
  return request({
    method: 'post',
    url: '/pad/house/rel/addOrUpdate',
    data: data
  })
}

// 获取文件管理列表
export function queryFileInfo(params) {
  return request({
    method: 'get',
    url: '/pad/publish/query',
    params
  })
}

// 新增文件信息
export function addFileInfo(data) {
  return request({
    method: 'post',
    url: '/pad/publish/addOrUpdate',
    data: data
  })
}

// 删除文件信息
export function deleteFileInfo(pkid) {
  return request({
    method: 'delete',
    url: `/pad/publish/delete?pkid=${pkid}`
  })
}

// 通过文件获取id
export function uploadFileById(data) {
  return request({
    method: 'post',
    url: '/resource/file/upload/file',
    data: data
  })
}

// 获取模板信息
export function getTemplateInfo(params) {
  return request({
    method: 'get',
    url: '/pad/project/manage/getProjectProcessNodeTemplate',
    params
  })
}

// 获取要素列表
export function getElementInfo(params) {
  return request({
    method: 'get',
    url: '/pad/project/manage/getDictTemplate',
    params
  })
}

// 通过字典获取
export function getDictInfo(
  dictCode = 'project_construction_elements'
) {
  return request({
    method: 'get',
    url: '/resource/dict/queryItem',
    params: { dictCode }
  })
}

// 投资主体下拉选项
export function queryInvestorOptions() {
  return request({
    method: 'get',
    url: '/pad/unit/query'
  })
}

// 建设项目批次选项
export function queryBatchNoOptions() {
  return request({
    method: 'get',
    url: '/pad/param/manage/batchNo'
  })
}

// 建设项目项目类型选项
export function queryProjectTypeOptions() {
  return request({
    method: 'get',
    url: '/pad/param/manage/type'
  })
}

// 建设项目项目阶段选项
export function queryProjectStageOptions() {
  return request({
    method: 'get',
    url: '/pad/param/manage/projectBase/buildStage'
  })
}

// 载体去化》产业/商业载体 批量操作企业
export function postBatchUpdateEnterprise(data) {
  return request({
    method: 'post',
    url: '/pad/build/enterprise/addOrUpdateBatch',
    data
  })
}
